<?php if (!defined('BASEPATH')) exit('No direct script access allowed');


class Reprot extends Admin_Controller {
	function __construct()
	{
		parent::__construct();
		$this->admin_navigation->parent_active('reports');
	}
	function reports_sms(){
		$columns = array(
						array(
							'name' => 'ID',
							'type' => 'id',
							'width' => '5%',
							'index'=>'id',
							'sort_column'=>'desc'
							),
						array(
							'name' => 'Khách hàng',
							'width' => '10%',
							'filter' => 'userid',
							'type' => 'text',
							'index'=>'userid',
							'sort_column'=>'desc'
							),
						array(
							'name'=>'Cú pháp',
							'width'=>'10%',
							'filter'=>'syntax',
							'type'=>'text',
							'index'=>'syntax',
						),
						array(
							'name'=>'Đầu số',
							'width'=>'10%',
							'filter'=>'service',
							'type'=>'text',
							'index'=>'service',
						),
						array(
							'name'=>'Date',
							'width'=>'10%',
							'filter'=>'datetime',
							'type'=>'date',
							'index'=>'datetime'
						),
						array(
							'name'=>'Số tiền',
							'width'=>'10%',
							'filter'=>'money',
							'type'=>'money',
							'index'=>'money'
						),
					);
		
		$this->grid->columns($columns);
		$this->grid->datasource('reports_sms_model','getData');
		$this->grid->base_url(admin_url('reports/reports_sms/'));
		$this->grid->title('Custumer SMS');
		$this->grid->addbutton('Thêm mới',admin_url('reports/add'),'add');
		$this->grid->initialize(TRUE);
		//$this->grid->action('Delete','delete');
		$this->load->model('reports_sms_model');
		$total_rows = $this->reports_sms_model->getCount($this->grid->get_unlimited_parameters());
		$this->grid->total_rows($total_rows);
		//$this->grid->initialize_pagination();
		$this->load->view('admin/reports_sms');	
	}
	function delete($id){
		
	}
}